import logging

from celery import Celery

app = Celery('celery_tasks', broker='redis://default:redispw@localhost:32770')

_logger = logging.getLogger(__name__)


@app.task(name='fetch_update_collection_infos')
def fetch_update_collection_infos(task_args, task_id):
    _logger.info('派发合集更新任务')

@app.task(name='merge_video')
def merge_video(task_args, task_id):
    _logger.info('派发视频合并任务')

@app.task(name='fetch_author_portal_info')
def fetch_author_portal_info(task_args, task_id):
    _logger.info('获取作者主页视频')

@app.task(name='publish_update_content')
def publish_update_content(task_args, task_id):
    '''在Discord发布更新
    {'频道名称': ['标题+地址', ...]}
    '''
    _logger.info('Discord发布更新')